package NowCoderHuaWei;

import java.util.*;
public class Test11{
    public static void main(String[] args)
        {
        Scanner in=new Scanner(System.in);
        while(in.hasNext())
            {
            int n=in.nextInt();
            String str=Integer.toString(n);
            System.out.println(new StringBuffer(str).reverse().toString());
        }
        in.close();
    }
}